home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aai.d64
/
sub saver ml
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
100 lines
100 REM ************************
110 REM * SUBSAVER.BAS *
120 REM * BASIC LOADER PROGRAM *
130 REM * *
140 REM * BY HOWARD CAMPBELL *
150 REM ************************
160 :
170 PRINT"[147]ENTER THE START ADDRESS FOR SUBSAVER.ML"
180 PRINT"49152 IS RECOMMENDED.":INPUTSA
190 EN=SA+251:TA=SA+197
200 HBTA=INT(TA/256):LBTA=TA-HBTA*256
210 GOSUB 1000 : IF T<>32049 THEN PRINT"DATA STATEMENT ERROR":END
220 POKESA+34,LBTA:POKESA+35,HBTA
230 POKESA+61,LBTA:POKESA+62,HBTA
240 F$="SUBSAVER."+STR$(SA): GOSUB1540
250 GOSUB2040
260 PRINT"[147]TO LOAD THE PROGRAM TYPE"
270 PRINT"LOAD"CHR$(34)F$CHR$(34)","DV",1"
280 PRINT"THEN LOAD THE PROGRAM CONTAINING"
290 PRINT"THE SUBROUTINES."
300 PRINT"TO SAVE A SUBROUTINE, TYPE THE FOLLOWING:"
310 PRINT"SYS"SA",FIRST LINE #,LAST LINE #"
320 PRINT"FOR EXAMPLE IF YOU WANT TO SAVE FROM"
330 PRINT"LINES 325 TO 500, TYPE THE FOLLOWING:"
340 PRINT"SYS"SA",325,500"
350 PRINT"SUBSAVER WILL DO THE REST!!"
360 END
370 :
380 :
996 REM ////////////
997 REM / ML POKER /
998 REM ////////////
999 :
1000 T=0 : FORI= SA TO EN : READA : T=T+A : POKEI,A :NEXTI : RETURN
1001 DATA32,253,174,32,158,173
1002 DATA32,247,183,165,20,141
1003 DATA167,2,165,21,141,168
1004 DATA2,32,253,174,32,158
1005 DATA173,32,247,183,32,19
1006 DATA166,176,4,32,197,192
1007 DATA96,165,95,133,253,165
1008 DATA96,133,254,173,167,2
1009 DATA133,20,173,168,2,133
1010 DATA21,32,19,166,176,4
1011 DATA32,197,192,96,165,95
1012 DATA133,251,165,96,133,252
1013 DATA160,4,200,177,253,208
1014 DATA251,152,24,101,253,133
1015 DATA253,165,254,105,0,133
1016 DATA254,200,200,152,24,101
1017 DATA253,133,34,165,254,105
1018 DATA0,133,35,160,1,162
1019 DATA0,177,253,153,169,2
1020 DATA138,145,253,200,192,3
1021 DATA208,243,160,0,185,235
1022 DATA192,32,210,255,200,201
1023 DATA0,208,245,160,0,32
1024 DATA207,255,153,178,2,200
1025 DATA192,17,240,4,201,13
1026 DATA208,241,136,152,162,178
1027 DATA160,2,32,189,255,169
1028 DATA8,162,8,160,255,32
1029 DATA186,255,169,251,166,34
1030 DATA164,35,32,216,255,169
1031 DATA8,32,195,255,160,1
1032 DATA185,169,2,145,253,200
1033 DATA192,3,208,246,96,160
1034 DATA0,185,211,192,32,210
1035 DATA255,200,201,13,208,245
1036 DATA96,147,76,73,78,69
1037 DATA32,78,85,77,66,69
1038 DATA82,32,78,79,84,32
1039 DATA70,79,85,78,68,13
1040 DATA0,147,69,78,84,69
1041 DATA82,32,70,73,76,69
1042 DATA78,65,77,69,13,0
1043 :
1500 REM //////////////////
1510 REM / DEVICE ENQUIRY /
1520 REM //////////////////
1530 :
1540 PRINT"[147]T[146]APE OR D[146]ISK (T/D)":POKE198,0
1550 GETA$:IFA$<>"D"ANDA$<>"T"THEN1550
1560 IFA$="D"THENF$="0:"+F$
1570 DV=1-7*(A$="D")
1580 RETURN
1590 :
2000 REM ////////////
2010 REM / SAVE RAM /
2020 REM ////////////
2030 :
2040 T$=F$:NA=PEEK(53)+PEEK(54)*256-LEN(T$):POKE782,NA/256
2050 POKE781,NA-PEEK(782)*256:POKE780,LEN(T$):SYS65469
2060 POKE780,1:POKE781,DV:POKE782,0:SYS65466
2070 POKE254,SA/256:POKE253,SA-PEEK(254)*256:POKE780,253
2080 POKE782,EN/256:POKE781,EN-PEEK(782)*256:SYS65496
2090 IF(PEEK(783)AND1)OR(ST AND 191)THENPRINT"SAVE ERROR. PRESS SPACE TO CONT."
2100 IF(PEEK(783)AND1)OR(ST AND 191)THENPOKE198,0:WAIT198,1,1:GOTO2040
2110 RETURN